package com.zqu.service.impl;

import com.zqu.mapper.PManagerment.Order1DetailMapper;
import com.zqu.pojo.OrderDetail;
import com.zqu.service.Order1DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Order1DetailServiceImpl implements Order1DetailService {

    @Autowired(required = false)
    private Order1DetailMapper order1DetailMapper;

    @Override
    public OrderDetail selectOrderDetailById(long id) {
        return order1DetailMapper.selectTById(id);
    }

    @Override
    public List<OrderDetail> selectList(OrderDetail orderDetail) {
        return order1DetailMapper.selectList(orderDetail);
    }

    @Override
    public boolean insertOrderDetail(OrderDetail orderDetail) {
        return order1DetailMapper.insertT(orderDetail)>0;
    }

    @Override
    public boolean updateOrderDetail(OrderDetail orderDetail) {
        return order1DetailMapper.updateT(orderDetail)>0;
    }

    @Override
    public boolean deleteOrderDetail(long id) {
        return order1DetailMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteOrderDetailByIds(String[] ids) {
        return order1DetailMapper.deleteTByIds(ids)>0;
    }
}
